package com.daodway.designpattern.mediatorpattern.standard;

import org.junit.Test;

public class Client {
	@Test
	    public  void main() {
			        MainBoard mediator = new MainBoard();
			        CDDriver cd = new CDDriver(mediator);
			        CPU cpu = new CPU(mediator);
			        VideoCard vc = new VideoCard(mediator);
			        SoundCard sc = new SoundCard(mediator);
			
			        mediator.setCdDriver(cd);
			        mediator.setCpu(cpu);
			        mediator.setVideoCard(vc);
			        mediator.setSoundCard(sc);
			
			        cd.readCD();
	    }
}
